package com.archerdu.apply.model;

import java.util.Date;

import com.archerdu.base.dao.BaseEntity;

/**
 * Entity:
 */
public class Product implements BaseEntity<Integer> {

    private static final long serialVersionUID = 1L;

    private Integer           id;

    /**
     * 产品唯一码.
     */
    private String            uniqueCode;

    /**
     * 关联企业名称.
     */
    private Integer           companyId;

    /**
     * 产品名称.
     */
    private String            name;

    /**
     * 目录主键.
     */
    private String            catalogId;

    /**
     * 完整的目录代码.
     */
    private String            catalogCode;

    /**
     * 制造商.
     */
    private String            manufacturer;

    /**
     * 产地.
     */
    private String            prodarea;

    /**
     * 品牌.
     */
    private String            brand;

    /**
     * 产品描述.
     */
    private String            description;

    /**
     * 产品头图.
     */
    private String            img;

    /**
     * 价格.
     */
    private Float             price;

    /**
     * 使用标识.
     */
    private Integer           useFlag;

    /**
     * 点击量.
     */
    private Integer           clickcount;

    /**
     * 关键词.
     */
    private String            keyword;

    /**
     * 创建者.
     */
    private Integer           createUser;

    /**
     * 创建时间.
     */
    private Date              createtime;

    /**
     * 更新人.
     */
    private Integer           updateUser;

    /**
     * 更新时间.
     */
    private Date              updatetime;

    public Product() {
    }

    public Product(int id, String uniqueCode) {
        this.id = id;
        this.uniqueCode = uniqueCode;
    }

    public Product(int id, String uniqueCode, Integer companyId, String name, String catalogId, String catalogCode,
            String manufacturer, String prodarea, String brand, String description, String img, Float price,
            Integer useFlag, Integer clickcount, String keyword, Integer createUser, Date createtime,
            Integer updateUser, Date updatetime) {
        this.id = id;
        this.uniqueCode = uniqueCode;
        this.companyId = companyId;
        this.name = name;
        this.catalogId = catalogId;
        this.catalogCode = catalogCode;
        this.manufacturer = manufacturer;
        this.prodarea = prodarea;
        this.brand = brand;
        this.description = description;
        this.img = img;
        this.price = price;
        this.useFlag = useFlag;
        this.clickcount = clickcount;
        this.keyword = keyword;
        this.createUser = createUser;
        this.createtime = createtime;
        this.updateUser = updateUser;
        this.updatetime = updatetime;
    }

    /**
     * toJson
     * 
     * @return String
     */
    public String toJson() {
        StringBuffer buffer = new StringBuffer();
        buffer.append("{");
        buffer.append("\"id\":\"" + id + "\",");
        buffer.append("\"uniqueCode\":\"" + uniqueCode + "\",");
        buffer.append("\"companyId\":\"" + companyId + "\",");
        buffer.append("\"name\":\"" + name + "\",");
        buffer.append("\"catalogId\":\"" + catalogId + "\",");
        buffer.append("\"catalogCode\":\"" + catalogCode + "\",");
        buffer.append("\"manufacturer\":\"" + manufacturer + "\",");
        buffer.append("\"prodarea\":\"" + prodarea + "\",");
        buffer.append("\"brand\":\"" + brand + "\",");
        buffer.append("\"description\":\"" + description + "\",");
        buffer.append("\"img\":\"" + img + "\",");
        buffer.append("\"price\":\"" + price + "\",");
        buffer.append("\"useFlag\":\"" + useFlag + "\",");
        buffer.append("\"clickcount\":\"" + clickcount + "\",");
        buffer.append("\"keyword\":\"" + keyword + "\",");
        buffer.append("\"createUser\":\"" + createUser + "\",");
        buffer.append("\"createtime\":\"" + createtime + "\",");
        buffer.append("\"updateUser\":\"" + updateUser + "\",");
        buffer.append("\"updatetime\":\"" + updatetime + "\",");
        buffer.deleteCharAt(buffer.length() - 1);
        buffer.append("}");
        return buffer.toString();
    }

    @Override
    public String toString() {

        StringBuffer buffer = new StringBuffer();

        buffer.append("[");

        buffer.append("\"产品唯一码\":\"" + uniqueCode + "\",");

        buffer.append("\"关联企业名称\":\"" + companyId + "\",");

        buffer.append("\"产品名称\":\"" + name + "\",");

        buffer.append("\"目录主键\":\"" + catalogId + "\",");

        buffer.append("\"完整的目录代码\":\"" + catalogCode + "\",");

        buffer.append("\"制造商\":\"" + manufacturer + "\",");

        buffer.append("\"产地\":\"" + prodarea + "\",");

        buffer.append("\"品牌\":\"" + brand + "\",");

        buffer.append("\"产品描述\":\"" + description + "\",");

        buffer.append("\"产品头图\":\"" + img + "\",");

        buffer.append("\"价格\":\"" + price + "\",");

        buffer.append("\"使用标识\":\"" + useFlag + "\",");

        buffer.append("\"点击量\":\"" + clickcount + "\",");

        buffer.append("\"关键词\":\"" + keyword + "\",");

        buffer.append("\"创建者\":\"" + createUser + "\",");

        buffer.append("\"创建时间\":\"" + createtime + "\",");

        buffer.append("\"更新人\":\"" + updateUser + "\",");

        buffer.append("\"更新时间\":\"" + updatetime + "\",");

        buffer.deleteCharAt(buffer.length() - 1);
        buffer.append("]");
        return buffer.toString();
    }

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUniqueCode() {
        return this.uniqueCode;
    }

    public void setUniqueCode(String uniqueCode) {
        this.uniqueCode = uniqueCode;
    }

    public Integer getCompanyId() {
        return this.companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCatalogId() {
        return this.catalogId;
    }

    public void setCatalogId(String catalogId) {
        this.catalogId = catalogId;
    }

    public String getCatalogCode() {
        return this.catalogCode;
    }

    public void setCatalogCode(String catalogCode) {
        this.catalogCode = catalogCode;
    }

    public String getManufacturer() {
        return this.manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public String getProdarea() {
        return this.prodarea;
    }

    public void setProdarea(String prodarea) {
        this.prodarea = prodarea;
    }

    public String getBrand() {
        return this.brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getImg() {
        return this.img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Float getPrice() {
        return this.price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public Integer getUseFlag() {
        return this.useFlag;
    }

    public void setUseFlag(Integer useFlag) {
        this.useFlag = useFlag;
    }

    public Integer getClickcount() {
        return this.clickcount;
    }

    public void setClickcount(Integer clickcount) {
        this.clickcount = clickcount;
    }

    public String getKeyword() {
        return this.keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public Integer getCreateUser() {
        return this.createUser;
    }

    public void setCreateUser(Integer createUser) {
        this.createUser = createUser;
    }

    public Date getCreatetime() {
        return this.createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Integer getUpdateUser() {
        return this.updateUser;
    }

    public void setUpdateUser(Integer updateUser) {
        this.updateUser = updateUser;
    }

    public Date getUpdatetime() {
        return this.updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

}
